from rest_framework import routers

from students.views import ClassView, StudentView, download_excel_temp
from django.urls import path

urlpatterns = [
    #下载学生信息模板
    path('students/download', download_excel_temp),
    #获取学生的点名信息
    path('students/roll-call',StudentView.as_view({
        'get':'getStudentsRollCall'
    })),
    # 获取学院和班级信息
    path('students/collegeClass', StudentView.as_view({
        'get': 'College_Class'
    })),
    # 根据班级获取学生信息
    path('students/sinfo', StudentView.as_view({
        'get': 'getStudentByClass'
    })),
    # 学生升末班
    path('students/raiseDropClass', StudentView.as_view({
        'post': 'raiseDropClass'
    })),
    path('getIsGaoZhi', ClassView.as_view({'get': 'getIsGaoZhi'})),
    path('classesinfo', ClassView.as_view({'get': 'getClassInfo'})),
]

router = routers.DefaultRouter(trailing_slash=False)  # 取消url地址后面的 /
# 班级的增删改查
router.register('classes', ClassView, basename='class')
#学生的增删改查
router.register('students', StudentView, basename='students')
urlpatterns += router.urls
print('1111111')